<?php
	

	function displayMap() {

		//get the latitude and longitude if available
		if(!isset($_GET['lat']) || !isset($_GET['lng'])) {
			//default value
			$lat = '38.817';
			$lng = '35.433';
		}
		else {
			$lat = $_GET['lat'];
			$lng = $_GET['lng'];
		}
	
		//load map and set location to the current $lat and $lng
		
		echo '<script type="text/javascript" language="javascript" src="mapscript.js"></script>';
		echo '<script type="text/javascript" language="javascript">window.onload = function() {load('.$lat.','.$lng.');};</script>';
		echo '<div id="map" style="width: 100%; height: 100%;"></div>';
	}
?>